<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('Guard/index')}">守护列表</a></li>
			<li class="active"><a >{:lang('EDIT')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Guard/editPost')}">
            <div class="form-group">
				<label for="input-type" class="col-sm-2 control-label"><span class="form-required">*</span>类型</label>
				<div class="col-md-6 col-sm-10">
                    <!-- <select class="form-control" name="type">
                        <volist name="type_a" id="v">
                        <option value="{$key}" <eq name="data['type']" value="$key">selected</eq>>{$v}</option>
                        </volist>
                    </select> -->
					{$type_a[$data['type']]}
				</div>
			</div>
            <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" name="name" value="{$data['name']}" readonly>
				</div>
			</div>
            <div class="form-group">
				<label for="input-coin" class="col-sm-2 control-label"><span class="form-required">*</span>价格</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-coin" name="coin" value="{$data['coin']}">
				</div>
			</div>
            <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>时长</label>
				<div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-length" name="length" style="display:inline-block;width:200px;" value="{$data['length']}" readonly>
                    <!-- <select class="form-control" name="length_type" style="display:inline-block;width:200px;">
                        <volist name="length_type_a" id="v">
                        <option value="{$key}" <eq name="data['length_type']" value="$key">selected</eq>>{$v}</option>
                        </volist>
                    </select> -->
                    <input type="hidden" name="length_type" value="{$data['length_type']}">
                    {$length_type_a[$data['length_type']]}
				</div>
			</div>

            

            <div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$data.id}" />
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>